#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：Employment_class 
@File    ：08_TCP客户端.py
@IDE     ：PyCharm 
@Author  ：XiaoDengYa
@Date    ：2021/7/5/005 15:51 
"""

from socket import *

tcpSocket = socket(AF_INET, SOCK_STREAM)

serAddr = ("192.168.73.1", 43200)

tcpSocket.connect(serAddr)

sedData = input("请输入要发送的数据：")

tcpSocket.send(sedData.encode("utf-8"))

recvData = tcpSocket.recv(1024)

print("接收到的数据未：{}".format(recvData))

tcpSocket.close()